home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Various / S.N.A.G. Disk of the Month 91-03 (1991)(Southern Nevada Amiga Group)(PD).zip / S.N.A.G. Disk of the Month 91-03 (1991)(Southern Nevada Amiga Group)(PD).adf / Calibrate / Calibrate.Docs < prev    next >
Text File  |  1991-03-29  |  13KB  |  276 lines

  1.  
  2.  
  3.  
  4. 1  INTRODUCTION
  5.  
  6. Some Amiga 2000s have a problem:  the battery backed up clock does not
  7. keep accurate time (it is not uncommon for the clock to gain a minute
  8. or two a day).  This problem is easily fixed.  The battery backed up
  9. clock has an adjustment screw which allows you to adjust the clock
  10. using a miniature screw driver.
  11.  
  12. The problem in adjusting the clock is that you need a reference source
  13. to calibrate the clock against.  Although you may have observed that
  14. your clock runs fast or slow by some number of minutes each day, that
  15. doesn't tell you how much you should turn the adjustment screw.  If
  16. you had access to the tools used to calibrate electronic watches you
  17. would be able to tune your Amiga's clock without trouble.  Since such
  18. tools are rare, most people have had to resort to trial and error to
  19. calibrate their Amiga's clock.
  20.  
  21. I have provided an alternative to trial and error:  I have written a
  22. program that compares the battery backed up clock against an
  23. independent timer in the Amiga that is based on the alternating
  24. current that powers your Amiga 2000.
  25.  
  26. The Amiga has several timers in addition to the battery backed up
  27. clock.  One of these timers is a line frequency clock that "ticks"
  28. every time the alternating current completes a cycle (that is it ticks
  29. 60 times a second for North America and 50 times a second for Europe).
  30. My program, called Calibrate, checks the time of the battery backed up
  31. clock against the line frequency clock every ten seconds and displays
  32. the results.  This gives you almost instant feedback which allows you
  33. to adjust the battery backed up clock much more accurately.
  34.  
  35. The Calibrate program can be used either from the Workbench or the
  36. CLI.  It can be used if your Amiga's power source is 60 cycles per
  37. second or 50 cycles per second.  The only tools you need are a medium
  38. Phillips head screwdriver (in order to open your Amiga 2000's case)
  39. and a small jeweler's screwdriver (to turn the adjustment screw).  The
  40. small jeweler's screwdriver should have a blade that is only about a
  41. sixteenth of an inch wide.  Screwdrivers of this type are sold for
  42. working on eye glasses; also, most Radio Shack stores carry a set that
  43. contains three miniature screw drivers of different sizes.
  44.  
  45. Before I adjusted my clock, it would gain two minutes a day.  After I
  46. adjusted the clock with the help of the Calibrate program, it loses a
  47. few seconds a week.  (Luck played a part in this success.)
  48.  
  49.  
  50.  
  51. 2  THE CALIBRATE PROGRAM
  52.  
  53. If you wish to use Calibrate from the Workbench and your country does
  54. not use 60 cycles per second alternating current, you will need to
  55. edit the tool types stored in the Calibrate icon.  To do this, click
  56. once on the Calibrate icon to highlight it.  Then select the "Info"
  57. menu item from the "Workbench" menu.  In the "Tool Types" portion of
  58. the Info Window, you will see a line that looks like "hertz=60".
  59.                                                                 Page 2
  60.  
  61.  
  62. Click on this line and edit it to reflect the power line frequency of
  63. your country (if you don't have 60 cycles per second power you
  64. probably have 50 cycles per second power).  Then click on the "Save"
  65. gadget on the lower left corner of the window.
  66.  
  67. After you have set up the icon for the Calibrate program, you can run
  68. it from the Workbench by double clicking on its icon.
  69.  
  70. To run the Calibrate program from the CLI, simply type the command
  71.  
  72.         run calibrate
  73.  
  74. and press return.  If you live in a country that does not use 60
  75. cycles per second alternating current, specify the frequency of your
  76. electricity after the "calibrate" in the command.  For example,
  77.  
  78.         run calibrate 50
  79.  
  80. Regardless of how you run the Calibrate program, it will open its own
  81. window to display its results.  This window will have the standard
  82. "close", "window to front" and "window to back" gadgets.  Next to the
  83. front and back gadgets is a orange and black gadget labeled "Restart".
  84. This gadget can be used to start a new round of testing without having
  85. to exit the program and run it again.
  86.  
  87. In the window will be three columns of information.  The first column
  88. is the elapsed time as measured by the line frequency clock.  This
  89. time will be displayed in units of ticks since testing began.
  90. Remember, this clock ticks once for each cycle in the AC current.  So
  91. a reading of 600 means 10 seconds for North America.  The numbers in
  92. this column should increase by 10 seconds worth of ticks every line.
  93.  
  94. The second column is the cumulative absolute error between the line
  95. frequency clock and the battery backed up clock.  As is the number in
  96. the first column, this number is measured in ticks.  A positive number
  97. means that the battery backed up clock is gaining time relative to the
  98. line frequency clock.  A negative number means the battery backed up
  99. clock is losing time.  Typically, this number will slowly increase or
  100. decrease as the test continues.
  101.  
  102. The third column is the cumulative relative error between the line
  103. frequency clock and the battery backed up clock.  This number is
  104. displayed as a ten thousandth of a percent.  In other words, a reading
  105. of 1/10000% is a relative error of one part in one million.  Thus, If
  106. your clock shows a relative error of 100/10000%, it will gain about
  107. nine seconds a day.
  108.  
  109. The Calibrate program will display a line of results every ten
  110. seconds.  At any time you may click on the "Restart" gadget to zero
  111. the elapsed time and restart the calculations of the absolute and
  112. relative errors.
  113.  
  114. The Calibrate program multitasks well.  It does not take over control
  115. of the whole Amiga or do anything that compromises the integrity of
  116. the operating system.  However, it does run at a moderately high
  117.                                                                 Page 3
  118.  
  119.  
  120. priority (priority 5) relative to most other programs.  Normally, a
  121. program that runs at a high priority will keep normal programs from
  122. running.  Calibrate does not do this because it spends most of its
  123. time asleep.  Calibrate sleeps for ten seconds, then spends a half
  124. second computing and displaying its results, and then goes back to
  125. sleep.  During the ten seconds that Calibrate is asleep, other
  126. programs on the Amiga will run normally.  During the half second that
  127. Calibrate is computing its results, most programs will seem to freeze.
  128. Do not let this bother you:  those programs will resume at the end of
  129. the half second as if they had never been interrupted.
  130.  
  131. Although you may run other programs at the same time you run
  132. Calibrate, Calibrate's measurements may be more accurate if it is the
  133. only program running.  (The effect that other programs have on
  134. Calibrate's measurements depends on what the other programs are doing
  135. and their priority.)  For the most accurate results, Calibrate should
  136. be the only program running.
  137.  
  138. Since Calibrate does not interfere with the system, you may want to
  139. try running it before attempting to calibrate your battery backed up
  140. clock to become familiar with its display and controls.  You may also
  141. want to run it a few days after calibrating your clock in order to
  142. check its accuracy.
  143.  
  144. The line frequency clock that Calibrate reads in order to do its job
  145. is actually "owned" my the Amiga's operating system.  Since Calibrate
  146. only reads the value of this clock, it does not interfere with the
  147. operating system.  However, since the operating system is using that
  148. clock for its own purposes, the operating system sometimes interferes
  149. with Calibrate.  About every ten to fifteen minutes, the operating
  150. system will alter the setting of the line frequency clock behind
  151. Calibrate's back.  This means that Calibrate will report terribly
  152. wrong results about every fifteen minutes.  If Calibrate seems to be
  153. reporting erroneous results, click on the "Restart" gadget to start
  154. testing over.
  155.  
  156.  
  157.  
  158. 3  ADJUSTING THE BATTERY BACKED UP CLOCK
  159.  
  160. Turn your Amiga and its monitor off.
  161.  
  162. If your monitor is setting on your Amiga, take it off and set it to
  163. the side.
  164.  
  165. Unplug the keyboard and mouse for your Amiga.
  166.  
  167. Remove the five screws that attach your Amiga's case.  Two of the
  168. screws are on the right bottom edge of the Amiga.  Two more are on the
  169. left bottom edge of the Amiga.  The fifth screw is in the middle top
  170. of the back of the Amiga next to the fan.
  171.  
  172. Remove the case by gently sliding the case forward.  If you feel the
  173. case hang, it may be catching on wires in the Amiga.  If this happens,
  174. try tipping the back of the case up a little bit so that it clears the
  175.                                                                 Page 4
  176.  
  177.  
  178. wires.
  179.  
  180. WARNING:  Once the case is off the Amiga, it becomes sensitive to
  181. static electricity.  Do not touch any of the circuit boards in the
  182. Amiga.  A simple touch could destroy the Amiga.
  183.  
  184. Plug the keyboard and mouse back into the Amiga.
  185.  
  186. Boot your Amiga with the case off.
  187.  
  188. Run the Calibrate program.
  189.  
  190. Locate the adjustment screw for the battery backed up clock.  Standing
  191. in front of the Amiga, the housing for disk drives will be on your
  192. right hand side.  Just to the left of the drive bays, will be the
  193. first slot of your Amiga.  This slot is the CPU expansion slot for
  194. plugging in a 68020 board to speed up your Amiga.
  195.  
  196. Between the end of the CPU slot and the front of the Amiga is the
  197. small variable capacitor used for tuning the clock.  This capacitor is
  198. labeled VC800, and on my Amiga is colored bright yellow.  This
  199. capacitor is a small cylinder with a small screw in its center.  This
  200. screw is used to adjust the battery backed up clock.
  201.  
  202. If the absolute and relative errors shown by Calibrate are positive,
  203. your clock is gaining time.  To make it run slower, turn the screw
  204. clockwise.
  205.  
  206. If the absolute and relative errors shown by Calibrate are negative,
  207. your clock is losing time.  To make it run faster, turn the screw
  208. counterclockwise.
  209.  
  210. When I was adjusting my clock, it appeared that the adjustment range
  211. of the screw was only 90 degrees.  Turning the screw more than 90
  212. degrees merely puts you in a different quadrant were a clockwise turn
  213. in that quadrant slows the clock and a counterclockwise turn speeds it
  214. up.  So, do not turn the screw more than 90 degrees.
  215.  
  216. After you adjust the screw, wait a few seconds, click on the Restart
  217. gadget in the Calibrate window.  The reason for waiting a few seconds
  218. is that the clock seems to behave erratically for a few seconds after
  219. adjustment.
  220.  
  221. After you click on the Restart gadget, the Calibrate program will
  222. display the statistics on the newly adjusted clock.  After a few lines
  223. of measurements are displayed, you may want to make further
  224. adjustments to the clock.
  225.  
  226. After you are satisfied with the accuracy of your battery backed up
  227. clock, turn your Amiga and monitor off, unplug the mouse and keyboard,
  228. and replace the cover.
  229.  
  230. Reboot your Amiga.  Set the time, and use the SETCLOCK OPT SAVE
  231. command to save the time to the battery backed up clock.  Later on,
  232. after a few days pass, you may want to compare the time stored by your
  233.                                                                 Page 5
  234.  
  235.  
  236. battery backed up clock to the correct time.  This is the best method
  237. to check the accuracy of the battery backed up clock.
  238.  
  239.  
  240.  
  241. 4  ACCURACY OF THE CALIBRATE PROGRAM
  242.  
  243. The Calibrate program may not allow you to adjust the clock as
  244. accurately as you might like.  The major problem is the accuracy of
  245. the power line frequency.  Averaged over the period of a day the line
  246. frequency is extremely accurate (otherwise electric clocks would gain
  247. or lose time every day).  However, over the course of a few minutes
  248. the frequency may be slightly off.  For example, as small a change as
  249. the line frequency being only 59.994 cycles per second instead of 60
  250. cycles per second when you calibrate your clock will result in a nine
  251. second per day error in your clock.
  252.  
  253. After calibrating my clock, comparing the time after week long
  254. intervals showed that it was accurate to about a second a day.
  255. However, if I ran the Calibrate program at certain times of the day,
  256. the program would report relative errors that predicted a twenty
  257. second a day miscalibration.  At other times of the day, the Calibrate
  258. program would report relative errors that showed my clock to be
  259. perfectly accurate.  Once, the Calibrate program showed absolute
  260. errors that were positive and increasing for awhile, then the errors
  261. would decrease to zero and then become negative; finally, the absolute
  262. errors would began increasing until zero and then become positive
  263. again.  The absolute errors described as sine wave with period of
  264. about a hundred seconds!  The conclusion:  I had adjusted my clock to
  265. be more accurate than the power line frequency when measured over
  266. short periods of time.  This meant that I could now use the Calibrate
  267. program to find the errors in the line frequency on the basis of the
  268. battery backed up clock rather than vice versa!
  269.  
  270. Even if the power line frequency is perfectly accurate, each
  271. measurement of Calibrate program could be off by one tick.  This means
  272. that you should not make an adjustment simply on the results of one or
  273. two lines from the program.  After making an adjustment, allow the
  274. program to run for a few minutes to confirm the trends in the
  275. statistics displayed.
  276.